package com.jwsoft.manager.core.dao.service;

import com.bifang.module.base.common.vo.tree.TreeVO;
import com.jwsoft.manager.core.dao.model.EduAddressTreeOriginal;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 服务类
 *
 * @author zhiyuan
 * @since 2024-01-08
 */
public interface EduAddressTreeOriginalService extends IService<EduAddressTreeOriginal> {

    /**
     * 向上得到参数表地址链路信息
     * @param treeId 地址id，从改地址，向上获取地址链路
     * @return 返回地址链路信息
     */
    List<EduAddressTreeOriginal> getAllLinkByOriginalId(Long treeId);

    List<EduAddressTreeOriginal> getAllDescendants(Long addressId);

    /**
     * 将list转为树形结构
     * @param treeVOList
     * @return
     */
    List<TreeVO> builderTreeList(List<TreeVO> treeVOList);
}
